package cn.iocoder.yudao.module.search.api.search.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.Map;

/**
 * RPC 服务 - 搜索文档 Request DTO
 *
 * @author 芋道源码
 */
@Schema(description = "RPC 服务 - 搜索文档 Request DTO")
@Data
public class SearchDocumentReqDTO {



    @Schema(description = "星球ID", example = "1001")
    private Long planetId;

    @Schema(description = "索引名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "user_index")
    @NotBlank(message = "索引名称不能为空")
    private String indexName;

    @Schema(description = "文档ID", example = "1")
    private String documentId;

    @Schema(description = "文档内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "{\"name\":\"张三\",\"age\":25}")
    @NotNull(message = "文档内容不能为空")
    private Map<String, Object> document;

}
